<!doctype html>
<html lang="en">
	<head>
		<?php include_once '/controller/test.php';?>
		<meta charset="utf-8">
		<title>jQuery UI Slider - Range slider</title>
		<link rel="stylesheet" href="css/jquery-ui.css">
		<script src="js/jquery-1.10.2.js"></script>
		<script src="js/jquery-ui.js"></script>
		<script>
			$(function() {
				$("#slider-range").slider({
					range : true,
					min : 0,
					max : 500,
					values : [75, 300],
					slide : function(event, ui) {
						$("#amount").val("$" + ui.values[0] + " - $" + ui.values[1]);
					}
				});
				$("#amount").val("$" + $("#slider-range").slider("values", 0) + " - $" + $("#slider-range").slider("values", 1));
			});
		</script>
	</head>
	<body>
		<div id="h1">
			Danh sách người dùng
		</div>
		<table width="500px" class="table">
			<tr>
				<td>id user</td>
				<td>ten user</td>
			</tr>
			<?php
			$conn = mysql_connect("localhost", "root", "") or die("error connect to server!");
			mysql_set_charset("utf8",$conn);
			mysql_select_db("quanlyuser", $conn) or die("error connect to db");
			$query = mysql_query("select * from user");
			
			if (mysql_num_rows($query) <> 0) {
				while ($rows = mysql_fetch_row($query)) {
					echo "<tr>";
					echo "<td>" . $rows[0] . "</td>";
					echo "<td>" . $rows[1] . "</td>";
					echo "</tr>";
				}
			} else {
				echo "khong ton tai user";
			}
			mysql_close($conn);
			?>
		</table>
		<!-- THEM VAO CO SO DU LIEU -->
		<table width="500px" class="table table-bordered">
			<tr>
				<td>id user</td>
				<td>ten user</td>
				<td>action</td>
			</tr>
			<tr>
				<form action="controller/test.php" method="post">
					<td>
					<input type="text" id="id_user" name="id_user" width="50px">
					</td>
					<td>
					<input type="text" id="ten_user" name="ten_user" width="50px">
					</td>
					<td>
					<input name="btnthem" type="submit" id="btn_them" value="them" >
					<input type="submit" id="btn_xoa" value="xoa" >
					</td>
				</form>
			</tr>
		</table>
		<!-- Tim so lon nhat-->
		
			<table width="500px" class="table table-bordered">
				<tr>
					<td>so thu nhat</td>
					<td>so thu hai</td>
					<td>so thu 3</td>
				</tr>
				<tr>
					<form action="controller/test.php" method="post">
						<td>
								<input type="text" id="id_user" name="st1" width="50px" >
						</td>
						<td>
								<input type="text" id="id_user" name="st2" width="50px" >
						</td>
						<td>
								<input type="text" id="id_user" name="st3" width="50px" >
						</td>
						<td><input name="btntimsolonnhat" type="submit" id="btn_sln" value="Tim max" ></td>
						
					</form>
				</tr>
			</table>
	</body>
</html>